/******************************************************************************
 *
 * Project:		mGameEngine
 * File:		brightnesscontrast.frag
 * Author:		karooolek
 * Created on:	2009-09-20
 *
 ******************************************************************************/

STRINGIZE(

uniform float brightness;
uniform float contrast;
uniform sampler2D texture;

void main()
{
	// get color
	vec4 tex = texture2D(texture, vec2(gl_TexCoord[0]));
	
	// brightness, contrast
	gl_FragColor = brightness + tex * contrast;
	
	// clamp color
	gl_FragColor = clamp(gl_FragColor, 0.0, 1.0);
}

) // STRINGIZE
